import java.util.concurrent.Semaphore;

public class Semaforo{
	 private Semaphore s;
	 public Semaforo(int v) {
		 s = new Semaphore(v, true);
	 } 
		  public void Wait() { 
		    try {
		      s.acquire();
		    } catch (InterruptedException e) { } 
		  } 
		  public void Signal() { 
			  s.release(); }

}